#!/bin/sh

openssl pkcs12 -in private.pfx -out test.pem -nodes
openssl rsa -in test.pem -out private.pem
openssl rsa -in test.pem -pubout -out public.pem
rm test.pem

# get certificate
#openssl x509 -inform der -in public.cer -out test.pem

# get public key of certificate
# PyCrypto does not support X.509 certificates. You must first extract the public key with the command
openssl x509 -inform der -in public.cer -pubkey -noout > public_srv.pem
